<?php
/**
 * Created by PhpStorm.
 * User: zhaojunlike
 * Date: 2016/12/1
 * Time: 21:45
 */

function checkPhoneExist($phone)
{
    $uMap['u_user'] = $phone;
    $ret = M('user')->where($uMap)->find();
    if ($ret) {
        return true;
    } else {
        return false;
    }
}

function encryptUserPwd($username, $password)
{
    return md5($username . $password);
}

function getUserGroupType($type_id)
{
    return M('tb_project_auth')->where(array('id' => $type_id))->find();
}

